<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

class Link extends Model
{
    use SoftDeletes;
    protected $table = 'links';

    protected $fillable = ['sort', 'name', 'url','module'];

    protected $appends = [
        'edit_url', 'destroy_url',
    ];

    public function getEditUrlAttribute()
    {
        return route('backend.link.edit', $this);
    }

    public function getDestroyUrlAttribute()
    {
        return route('backend.link.destroy', $this);
    }
}
